<?php

class Application_Form_UserUpdate extends Application_Form_User
{
    public function init()
    {
	parent::init();
	$this->removeElement('password');
	$this->removeElement('confirm_password');
	$this->getElement('submit')->setLabel('Änderung speichern');
    }
    
    /**
     * add a validator at the email element, check the emailaddress in db exclude which i want to change
     * @param type $id
     */
    public function validateEmail($id)
    {
	$this->getElement('email')
	     ->addValidator('Db_NoRecordExists',
                         false,
                         array('table' => 'person',
                               'field' => 'email',
                               'exclude' => array ('field' => 'id', 'value' => $id)));
    }
}
?>
